package com.ambow.common.base.impl;

/**
 * @author 周志伟
 * @projectname 项目名称: ${project_name}
 * @classname: BaseServiceImpl
 * @description:
 * @date 2this.getMappser()19/6/2this.getMappser()：17:12
 */


import com.ambow.common.base.dao.BaseMapper;
import com.ambow.common.base.service.BaseService;

import java.io.Serializable;
import java.util.List;

public abstract class BaseServiceImpl<T, E extends Serializable> implements BaseService<T, E> {

    public abstract BaseMapper<T, E> getMappser();

    public int insert(T record) {
        return getMappser().insert(record);
    }
    public int deleteByPrimaryKey(Object key) {
        return this.getMappser().deleteByPrimaryKey(key);
    }

    public int delete(T record) {
        return this.getMappser().delete(record);
    }

    public int insertSelective(T record) {
        return this.getMappser().insertSelective(record);
    }

    public boolean existsWithPrimaryKey(Object key) {
        return this.getMappser().existsWithPrimaryKey(key);
    }

    public List<T> selectAll() {
        return this.getMappser().selectAll();
    }

    public T selectByPrimaryKey(Object key) {
        return this.getMappser().selectByPrimaryKey(key);
    }

    public int selectCount(T record) {
        return this.getMappser().selectCount(record);
    }

    public List<T> select(T record) {
        return this.getMappser().select(record);
    }

    public T selectOne(T record) {
        return this.getMappser().selectOne(record);
    }

    public int updateByPrimaryKey(T record) {
        return this.getMappser().updateByPrimaryKey(record);
    }

    public int updateByPrimaryKeySelective(T record) {
        return this.getMappser().updateByPrimaryKeySelective(record);
    }

    public int deleteByCondition(Object condition) {
        return this.getMappser().deleteByCondition(condition);
    }

    public List<T> selectByCondition(Object condition) {
        return this.getMappser().selectByCondition(condition);
    }

    public int selectCountByCondition(Object condition) {
        return this.getMappser().selectCountByCondition(condition);
    }

    public int updateByCondition(T record, Object condition) {
        return this.getMappser().updateByCondition(record,condition);
    }

    public int updateByConditionSelective(T record, Object condition) {
        return this.getMappser().updateByConditionSelective(record,condition);
    }

    public int deleteByExample(Object example) {
        return this.getMappser().deleteByExample(example);
    }

    public List<T> selectByExample(Object example) {
        return this.getMappser().selectByExample(example);
    }

    public int selectCountByExample(Object example) {
        return this.getMappser().selectCountByExample(example);
    }

    public T selectOneByExample(Object example) {
        return null;
    }

    public int updateByExample(T record, Object example) {
        return this.getMappser().updateByExample(record,example);
    }

    public int updateByExampleSelective(T record, Object example) {
        return this.getMappser().updateByExampleSelective(record,example);
    }

    public int deleteByIds(String ids) {
        return this.getMappser().deleteByIds(ids);
    }

    public List<T> selectByIds(String ids) {
        return this.getMappser().selectByIds(ids);
    }

    public int insertList(List<T> recordList) {
        return this.getMappser().insertList(recordList);
    }

    public int insertUseGeneratedKeys(T record) {
        return this.getMappser().insertUseGeneratedKeys(record);
    }


}